const mongoose = require("mongoose")

const Schema = mongoose.Schema

const ManBing = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})

const FamilyBing = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})


const GM = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})


const FoodGM = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})

const selfDone = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})


const KeShiSchema = new Schema({
    name: {
        type: String,
        required: true
    },
    status: {
        type: String,
        default: "1"
    },
    active: {
        type: String,
        default: "2"
    }
})

module.exports = {
    GM: mongoose.model("guoming", GM),
    FoodGM: mongoose.model("foodguoming", FoodGM),
    ManBing: mongoose.model("manbing", ManBing),
    FamilyBing: mongoose.model("familybing", FamilyBing),
    SelfDone: mongoose.model("selfxiguan", selfDone),
    KeShi: mongoose.model("keshi", KeShiSchema)
}